require('../../assets/css/index.js')

require('./my.less')
require('../../assets/iconfonts/iconfont.css')


let dom = require('../../utils/dom')
let http = require('../../utils/http')
let Swiper = require('../../utils/swiper-bundle.min')
let local = require('../../utils/local')

dom.ready(function () {
    var mySwiper = new Swiper('.swiper-container', {
        autoplay: true,
        loop: true,
        pagination: {
            el: '.swiper-pagination',
        },
    })

    dom.Foot('my')
    function Userinfo(){
        http.get('/api/user/info',{},function(res){
        if(res.errno==0){
            let {nickName,imgUrl,sign} = res.data
            dom.getEl('#UserPic').src=http.baseURL+imgUrl
            dom.getEl('#UserName').innerText=nickName
            dom.getEl('#UserText').innerText=sign?sign:'这家伙很懒，什么都没留下...'
            
            local.set('userInfo',res.data)
        }
    })
    }

    Userinfo()
 

})